package framework;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

public class PropertiesLoader {
	
	private static Properties prop = null;
	
	protected static String path = "resources/conf.properties";
	
	public static Properties getInstance() {
		if (prop == null) {
			try {
				File file = new File("path");
				FileInputStream in;
				in = new FileInputStream(file);
				prop.load(in);
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return prop;
	}
	
	public static void save() {
		if (prop == null) {
			return;
		}
		File file = new File("path");
		FileOutputStream out;
		try {
			out = new FileOutputStream(file);
			prop.store(out, "");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
